<template>
    <div>
        <div>111111111111</div>
        <button @click="initTableData">1111</button>
    </div>
</template>
<script>


export default {
    name: 'test',
    data: function () {
        return {
            search: {
                currentPage: 1,
                pageSize: 5,
                keyword: "",
                sort: "id",
                direction: "desc",
            }


        }
    },
    methods: {
        // Text() {
        //     console.log(this.search);
        // },
        initTableData() {
            var self = this;
            console.log(this.search);
            debugger
            $.ajax({
                url: "http://127.0.0.1:8000/api/test/houseInfos",
                type: 'post',
                ContentType: "application/json",
                data: JSON.stringify(self.search),
                success: function (res) {
                    if (res.status == 200) {
                        console.log(res)
                    }
                },
                error() {
                    debugger
                    console.log(this)
                }

            })
            // var self = this;
            // this.$Request
            //     .fetch_("/api/test/houseInfos", "post", self.search)
            //     .then((result) => {
            //        console.log();

            //     })
            //     .catch((error) => {
            //         console.log(error);
            //     });
        },
        // created() {
        //     this.initTableData();
        //     // this.Text()
        // }
    }
}
</script>

<style>

</style>